package com.pand.model.alarm;

import com.pand.model.BaseObject;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by leber on 2017/8/31.
 */
@Entity
@Table(name = "BIZ_ELECTRIC_FENCE_ALARM")
@SequenceGenerator(name = "SeqElectricFenceAlarm", sequenceName = "SEQ_ELECTRIC_FENCE_ALARM", allocationSize = 1)
public class ElectricFenceAlarm extends BaseObject{
    private Integer id;//主键id sequence:seq_electric_fence_alarm
    private Integer fenceId;//电子围栏id
    private Integer type;//告警类型：1(驶出围栏)、2(驶入围栏)、3(驶入驶出围栏)
    private String license;//车牌号
    private String vin;//车架号
    private Double overDistance;//超出围栏距离 单位：米
    private Double intoDistance;//进入围栏距离 单位：米
    private String alarmOrderNo;//告警时车辆所属订单号
    private String alarmUserName;//告警时车辆所属订单用户姓名
    private String alarmUserPhone;//告警时车辆所属订单用户手机号
    private Date alarmTime;//告警时间
    private Double alarmLongitude;//告警时经度
    private Double alarmLatitude;//告警时纬度
    private Integer status;//告警状态：0(告警中)、1(已解除)
    private Date removeTime;//告警解除时间
    private Integer removeType;//解除类型：0(自动解除)、1(手动解除)
    private Integer removeControlUserId;//解除告警操作用户
    private Double removeLongitude;//告警解除时经度
    private Double removeLatitude;//告警解除时纬度
    private String cityCode;//城市代码
    private Double soc;//电量
    private Double minSoc;//最小电量
    private Double maxSoc;//最大电量
    @Id
    @GeneratedValue(generator = "SeqElectricFenceAlarm")
    @Column(name = "ID")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    @Column(name = "FENCE_ID")
    public Integer getFenceId() {
        return fenceId;
    }

    public void setFenceId(Integer fenceId) {
        this.fenceId = fenceId;
    }
    @Column(name = "TYPE")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    @Column(name = "LICENSE")
    public String getLicense() {
        return license;
    }

    public void setLicense(String license) {
        this.license = license;
    }
    @Column(name = "VIN")
    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    @Column(name = "OVER_DISTANCE")
    public Double getOverDistance() {
        return overDistance;
    }

    public void setOverDistance(Double overDistance) {
        this.overDistance = overDistance;
    }
    @Column(name = "INTO_DISTANCE")
    public Double getIntoDistance() {
        return intoDistance;
    }

    public void setIntoDistance(Double intoDistance) {
        this.intoDistance = intoDistance;
    }
    @Column(name = "ALARM_ORDER_NO")
    public String getAlarmOrderNo() {
        return alarmOrderNo;
    }
    @Transient
    public String getAlarmUserName() {
        return alarmUserName;
    }

    public void setAlarmUserName(String alarmUserName) {
        this.alarmUserName = alarmUserName;
    }
    @Transient
    public String getAlarmUserPhone() {
        return alarmUserPhone;
    }

    public void setAlarmUserPhone(String alarmUserPhone) {
        this.alarmUserPhone = alarmUserPhone;
    }

    public void setAlarmOrderNo(String alarmOrderNo) {
        this.alarmOrderNo = alarmOrderNo;
    }
    @Column(name = "ALARM_TIME")
    public Date getAlarmTime() {
        return alarmTime;
    }

    public void setAlarmTime(Date alarmTime) {
        this.alarmTime = alarmTime;
    }
    @Column(name = "ALARM_LONGITUDE")
    public Double getAlarmLongitude() {
        return alarmLongitude;
    }

    public void setAlarmLongitude(Double alarmLongitude) {
        this.alarmLongitude = alarmLongitude;
    }
    @Column(name = "ALARM_LATITUDE")
    public Double getAlarmLatitude() {
        return alarmLatitude;
    }

    public void setAlarmLatitude(Double alarmLatitude) {
        this.alarmLatitude = alarmLatitude;
    }
    @Column(name = "STATUS")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    @Column(name = "REMOVE_TIME")
    public Date getRemoveTime() {
        return removeTime;
    }

    public void setRemoveTime(Date removeTime) {
        this.removeTime = removeTime;
    }
    @Column(name = "REMOVE_TYPE")
    public Integer getRemoveType() {
        return removeType;
    }

    public void setRemoveType(Integer removeType) {
        this.removeType = removeType;
    }
    @Column(name = "REMOVE_CONTROL_USER_ID")
    public Integer getRemoveControlUserId() {
        return removeControlUserId;
    }

    public void setRemoveControlUserId(Integer removeControlUserId) {
        this.removeControlUserId = removeControlUserId;
    }
    @Column(name = "REMOVE_LONGITUDE")
    public Double getRemoveLongitude() {
        return removeLongitude;
    }

    public void setRemoveLongitude(Double removeLongitude) {
        this.removeLongitude = removeLongitude;
    }
    @Column(name = "REMOVE_LATITUDE")
    public Double getRemoveLatitude() {
        return removeLatitude;
    }

    public void setRemoveLatitude(Double removeLatitude) {
        this.removeLatitude = removeLatitude;
    }
    @Transient
    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
    @Transient
    public Double getSoc() {
        return soc;
    }

    public void setSoc(Double soc) {
        this.soc = soc;
    }
    @Transient
    public Double getMinSoc() {
        return minSoc;
    }

    public void setMinSoc(Double minSoc) {
        this.minSoc = minSoc;
    }
    @Transient
    public Double getMaxSoc() {
        return maxSoc;
    }

    public void setMaxSoc(Double maxSoc) {
        this.maxSoc = maxSoc;
    }
}
